<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        /*//打印100以内所有偶数的和
        var total = 0;
        var num = 2;
        while(num<=100){
            total+=num;
            num+=2
        }
        console.log(total);
        */




       /*//打印出1000-2000年中所有的闰年
       for(var i=1000;i<=2000;i++){
        if(i%4==0 && i%100!=0 || i%400==0){
            console.log(i);
        }
       }
       */



       //用数组模拟一个记名册，依次输出每个人的名字
       var group=["张三","李四","王五","赵六"];
       for(var i=0;i<group.length;i++){
        var res = group[i];
        console.log(res);
       }
       


       /*//输出100-200之间所有的质数
       out:
       for(var x=100;x<=200;x++){
        for(var y=2;y<=x/2;y++){
            if(x%y===0){
                continue out;
            }
        }
        console.log(x);
       }
       */
    </script>
</body>
</html>